#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QToolButton>
#include <QMouseEvent>
#include <mutex>
#include "view/home_view.h"
#include "view/setting_view.h"
#include "view/task_view.h"

QT_BEGIN_NAMESPACE

namespace Ui
{
    class MainWindow;
}

QT_END_NAMESPACE

class Applet : public QMainWindow
{
    Q_OBJECT
    void setToNavitorBtn(QToolButton* btn, const QString& icon_file, const char* text, int index);
    void initNavigator();
    void changeMainView(QToolButton* naviBtn, int index);
public:
    explicit Applet(QWidget* parent = nullptr);
    ~Applet() override;
private:
    QToolButton* current_navi_ = nullptr;
    std::mutex current_navi_lock_;
    Ui::MainWindow* ui;
    QStyle* empty_qss_;
    HomeView* home_view_{};
    TaskView* task_view_{};
    SettingView* setting_view_{};
};
#endif // MAINWINDOW_H
